{include file="common/_meta" /}
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
		<input type="text" class="hidden" name="id" value="{$info.id|default=''}">
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>姓名：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="{$info.ad_name|default=''}" placeholder="" id="adminName" name="ad_name">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>手机：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="{$info.ad_tel|default=''}" placeholder="" id="phone" name="ad_tel">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">角色：</label>
		<div class="formControls col-xs-8 col-sm-9"> <span class="select-box" style="width:150px;">
			<select class="select" name="role_id" size="1">
				{volist name="roles" id="vo"}
					<option value="{$vo.id}">{$vo.title}</option>
				{/volist}
			</select>
			</span> </div>
	</div>
	<div class="row cl">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
			<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" onclick="return add()">
		</div>
	</div>
	</form>
</article>

{include file="common/_footer"/}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
});

function add(){

	var ad_name = $('input[name="ad_name"]').val();
	var ad_tel  = $('input[name="ad_tel"]').val();
	if(ad_tel == ''){layer.msg('请输入手机号码');}
	$.post("{:url('Admin/adminAdd')}",$('form').serialize()).success(function(data){
		layer.msg(data.msg);
		if(data.code){
			setTimeout(function(){
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);
			},500);
			
		}
	});
	return false;
}

</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>